package com.interesting.examsystem.common.enums;

/**
 * @author ：ZXY
 * @date ：Created in 2021/2/22 16:16
 * @description：操作状态
 * @modified By：`
 * @version: 1.0
 */
public enum OperateTypeEnum {
    INSERT("01", "新增"),
    UPDATE("02", "修改"),
    DELETE("03", "删除"),
    IMPORT1("04", "导入"),
    EXPORT("05", "导出"),
    QUERY("06", "查询"),
    UPLOAD("07", "上传"),
    LOGIN("08", "登录"),
    LOGINOUT("09", "登出"),
    START("10", "启动"),
    STOP("11", "停止"),
    RELEASE("12", "发布"),
    ILLEALVISIT("13", "非法访问"),
    SYNCHRO("14", "同步"),
    COMPARE("15", "比对"),
    REPORT("16", "上报"),
    ISSUEED("17", "下发"),
    VALIDATE("18", "校验"),
    REFRESH("19", "刷新"),
    REFRESHCACHE("20", "刷新缓存"),
    DOWNLINE("21", "下线"),
    REPEAL("22", "撤销"),
    HDFS("23", "分布式文件"),
    HBASE("24", "列式数据存储"),
    HIVE("25", "分布式数据仓库"),
    RDMS("26", "关系型数据库"),
    APPLY("27", "申请"),
    APPROVE("28", "审批"),
    PUBLISH("29", "任务发布"),
    UNPUBLISH("30", "取消发布"),
    DOWNLOAD("31", "下载"),
    CONNECT("32", "链接"),
    ARCHIVE("33", "备份"),
    RECOVERY("34", "恢复"),
    ALARM("35", "告警"),
    SHARE("36", "共享"),
    UNSHARE("37", "取消共享"),
    SUPPEND("38", "挂起");

    private String key;
    private String value;

    public String getKey() {
        return this.key;
    }

    public void setKey(String key) {
        this.key = key;
    }

    public String getValue() {
        return this.value;
    }

    public void setValue(String value) {
        this.value = value;
    }

    OperateTypeEnum(String key, String value) {
        this.key = key;
        this.value = value;
    }

    public static String getCodeValue(String key) {
        String value = "";
        byte b;
        int i;
        OperateTypeEnum[] arrayOfOperateTypeEnum = values();
        for (i = values().length, b = 0; b < i; ) {
            OperateTypeEnum operateType = arrayOfOperateTypeEnum[b];
            if (key.equals(operateType.getKey())) {
                value = operateType.getValue();
                break;
            }
            b++;
        }
        return value;
    }
}

